home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / m2 / cat3src / magic / d / mtxrsrc.d < prev    next >
Text File  |  1997-10-26  |  6KB  |  107 lines

  1. DEFINITION MODULE mtXRsrc;
  2.  
  3. IMPORT SYSTEM;
  4. IMPORT mtUtils;
  5.  
  6. FROM MagicSys   IMPORT  Nil, Null, Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6,
  7.                         Bit7, Bit8, Bit9, Bit10, Bit11, Bit12, Bit13, Bit14,
  8.                         Bit15, LOC, Byte, ByteSet, sWORD, sINTEGER, sCARDINAL,
  9.                         sBITSET, lINTEGER, lCARDINAL, lWORD, lBITSET,
  10.                         CastToChar, CastToByte, CastToByteset, CastToInt,
  11.                         CastToCard, CastToBitset, CastToWord, CastToLInt,
  12.                         CastToLCard, CastToLBitset, CastToLWord, CastToAddr,
  13.                         TosVersion, Accessory, Basepage, SysHeader, TosDate;
  14.  
  15. (*$Z+*)
  16. (*$[+ MM2: Returnwert in D0, Parameterbergabe ber Stack *)
  17. TYPE
  18.                   tRsBuffer = ARRAY[0..15] OF sINTEGER;   (* Fr die C-Lib *)
  19.  
  20.                   xrsrc_loadP = PROCEDURE ((* Name       *) SYSTEM.ADDRESS,
  21.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  22.                   xrsrc_relocP= PROCEDURE (    (* Adr        *) SYSTEM.ADDRESS,
  23.                                                (* length     *) lCARDINAL,
  24.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  25.                   xrsrc_freeP = PROCEDURE (VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  26.                   xrsrc_gaddrP= PROCEDURE (    (* Type       *) sINTEGER,
  27.                                                (* Index      *) sINTEGER,
  28.                                            VAR (* Gaddr      *) SYSTEM.ADDRESS,
  29.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  30.                   xrsrc_saddrP= PROCEDURE (    (* Type       *) sINTEGER,
  31.                                                (* Index      *) sINTEGER,
  32.                                            VAR (* Saddr      *) SYSTEM.ADDRESS,
  33.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  34.                   xrsrc_obfixP= PROCEDURE (    (* Tree       *) SYSTEM.ADDRESS,
  35.                                                (* Object     *) sINTEGER) : sINTEGER;
  36.                   init_xrsrcP = PROCEDURE (    (* vdi_handle *) sINTEGER,
  37.                                            VAR (* desk       *) mtUtils.tRect,
  38.                                                (* wbox       *) sINTEGER,
  39.                                                (* hbox       *) sINTEGER) : sINTEGER;
  40.                   term_xrsrcP= PROCEDURE;
  41.  
  42. TYPE tRshCalls = RECORD
  43.                   xrsrc_load  : xrsrc_loadP;
  44.                   xrsrc_reloc : xrsrc_relocP;
  45.                   xrsrc_free  : xrsrc_freeP;
  46.                   xrsrc_gaddr : xrsrc_gaddrP;
  47.                   xrsrc_saddr : xrsrc_saddrP;
  48.                   xrsrc_obfix : xrsrc_obfixP;
  49.                   init_xrsrc  : init_xrsrcP;
  50.                   term_xrsrc : term_xrsrcP;
  51.  
  52.                 END;
  53. (*
  54. TYPE tRshCalls = RECORD
  55.                   (* $ K+ $R2+  Aufrufer r„umt Stack, A2/D2 sichern (HM2) *)
  56.                   xrsrc_load  : PROCEDURE ((* Name       *) SYSTEM.ADDRESS,
  57.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  58.                   xrsrc_reloc : PROCEDURE (    (* Adr        *) SYSTEM.ADDRESS,
  59.                                                (* length     *) lCARDINAL,
  60.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  61.                   xrsrc_free  : PROCEDURE (VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  62.                   xrsrc_gaddr : PROCEDURE (    (* Type       *) sINTEGER,
  63.                                                (* Index      *) sINTEGER,
  64.                                            VAR (* Gaddr      *) SYSTEM.ADDRESS,
  65.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  66.                   xrsrc_saddr : PROCEDURE (    (* Type       *) sINTEGER,
  67.                                                (* Index      *) sINTEGER,
  68.                                            VAR (* Saddr      *) SYSTEM.ADDRESS,
  69.                                            VAR (* pglobal    *) tRsBuffer) : sINTEGER;
  70.                   xrsrc_obfix : PROCEDURE (    (* Tree       *) SYSTEM.ADDRESS,
  71.                                                (* Object     *) sINTEGER) : sINTEGER;
  72.                   init_xrsrc  : PROCEDURE (    (* vdi_handle *) sINTEGER,
  73.                                            VAR (* desk       *) mtUtils.tRect,
  74.                                                (* wbox       *) sINTEGER,
  75.                                                (* hbox       *) sINTEGER) : sINTEGER;
  76.                   term_xrsrc : PROCEDURE;
  77.                   (* K= R2=*)
  78.  
  79.                 END;
  80. *)
  81. (*$Z=,[= MM2: Returnwert in D0, Parameterbergabe ber Stack *)
  82.  
  83. VAR RshCalls : POINTER TO tRshCalls;
  84.  
  85. PROCEDURE InitMtXrsrc ();
  86. (* Setzt RshCalls richtig *)
  87.  
  88. (*$Z+*)
  89. (*$[+ MM2: Returnwert in D0, Parameterbergabe ber Stack *)
  90.  
  91. PROCEDURE XrsrcLoad ( Name: SYSTEM.ADDRESS; VAR pglobal: tRsBuffer) : sINTEGER;
  92. PROCEDURE XrsrcReloc (Adr: SYSTEM.ADDRESS; length: lCARDINAL; 
  93.                       VAR pglobal: tRsBuffer) : sINTEGER;
  94. PROCEDURE XrsrcFree (VAR pglobal: tRsBuffer) : sINTEGER;
  95. PROCEDURE XrsrcGaddr ( Type: sINTEGER; Index: sINTEGER;
  96.                        VAR Gaddr: SYSTEM.ADDRESS;
  97.                        VAR pglobal: tRsBuffer) : sINTEGER;
  98. PROCEDURE XrsrcSaddr ( Type: sINTEGER; Index: sINTEGER;
  99.                        VAR Saddr: SYSTEM.ADDRESS;
  100.                        VAR pglobal: tRsBuffer) : sINTEGER;
  101. PROCEDURE XrsrcObfix ( Tree: SYSTEM.ADDRESS; Object: sINTEGER) : sINTEGER;
  102. PROCEDURE InitXrsrc ( vdi_handle : sINTEGER; VAR desk: mtUtils.tRect;
  103.                       wbox: sINTEGER; hbox: sINTEGER) : sINTEGER;
  104. PROCEDURE TermXrsrc ();
  105.  
  106. END mtXRsrc.
  107.